﻿#define _CRT_SECURE_NO_WARNINGS

#include "Myset.h"
#include"Mymap.h"
int main()
{
	bao::set<int> myset;
	myset.insert(5);
	myset.insert(2);
	myset.insert(4);
	myset.insert(5);
	myset.insert(1);
	myset.insert(3);
	bao::set<int>::iterator sit = myset.begin();
	while (sit != myset.end())
	{
		cout << *sit << ' ';
		++sit;
	}
	cout << endl;

	bao::set<int>::iterator rsit = myset.end();
	while (rsit != myset.begin())
	{
		--rsit;
		cout << *rsit << ' ';
	}
	cout << endl;

	bao::map<string, string> dict;
	dict.insert({ "sort", "排序" });
	dict.insert({ "left", "左边" });
	dict.insert({ "right", "右边" });
	dict["left"] = "左边，剩余";
	dict["insert"] = "插入";
	dict["string"];
	bao::map<string, string>::iterator it = dict.begin();
	while (it != dict.end())
	{
		// 不能修改first，可以修改second
		//it->first += 'x';
		//it->second += 'x';
		cout << it->first << ":" << it->second << endl;
		++it;
	}
	cout << endl;
	return 0;
}



